<template>
  <div>
    <LazyLoadTab v-model="activeName" :tabMenus="menus"></LazyLoadTab>
  </div>
</template>
<script>
// import unconfirm from './unconfirm';
// import undeal from './undeal';
// import deal from './deal';
export default {
  name: 'clszhz',
  components: {
    // unconfirm,
    // undeal,
    // deal
  },
  data() {
    return {
      activeName: '横向报表',
      dataupdate: 0,
      customerInfo: '材料收支汇总',
      menus: [
        {
          title: '横向报表',
          path: 'part/report/revenueAndExpenditure/transverseIndex',
          on: {
            update: this.updateinfo
          },
          params: {
            flag: '',
            ptype: this.ptype
          }
        },
        {
          title: '纵向报表',
          path: 'part/report/revenueAndExpenditure/portrait',
          on: {
            update: this.updateinfo
          },
          params: {
            flag: '',
            ptype: this.ptype
          }
        }
      ]
    };
  },
  computed: {
    ptype() {
      console.log(this.$route.meta.ptype, 1283281838);

      return this.$route.meta.ptype;
    } // 模块区分
  },
  methods: {
    updateinfo() {
      if (this.dataupdate === 0) {
        this.menus[0].params.flag = 'yes';
        this.menus[1].params.flag = 'yes';
        this.dataupdate = 1;
      } else {
        this.menus[0].params.flag = 'no';
        this.menus[1].params.flag = 'no';
        this.dataupdate = 0;
      }
    }
  }
};
</script>
<style lang="less" scoped></style>
